﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pay.Data {
    public partial class TokenShippingMap
    : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<TokenShipping> {
        public TokenShippingMap() {
            // table
            ToTable("mc_TokenShipping", "dbo");

            // keys
            HasKey(t => t.OrderId);

            // Properties
            Property(t => t.OrderId)
                .HasColumnName("OrderId")
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None)
                .IsRequired();
            HasRequired(t => t.TokenBazaarOrder)
              .WithOptional(t=>t.TokenShipping)
              .WillCascadeOnDelete(false);
        }
    }
}
